#version 400

layout (location = 0) out vec4 fragment_color;

uniform ivec2 framebuffer_size;
uniform ivec2 source;
uniform ivec2 destination;

uniform sampler2D image_map;

void main()
{
	vec2 s = source / float(framebuffer_size);
	vec2 d = destination / float(framebuffer_size);
	vec2 tcoord = gl_FragCoord.xy / float(framebuffer_size);

	//float sd_distance = length(d - s);
	//float sfd_distance = length(f - s) + length(d - f);
	//float difference = sfd_distance - sd_distance;

	//fragment_color = vec4(difference, difference, difference, 1);
	fragment_color = texture(image_map, tcoord);
}